package com.casework

class IndexSearchJob {

    static triggers = {
        cron name:'indexSearchTrigger', startDelay:10000, cronExpression: '0 0 3 * * ?' //3am every day - start delay of 10 seconds
    }

    def searchableService

    def execute() {
        println 'reindex - start'
        searchableService.reindex()
        println 'reindex - end'
    }
}
